home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
programr
/
wclass21.zip
/
CPPHEAD.SCT
< prev
next >
Wrap
Text File
|
1995-01-16
|
5KB
|
150 lines
// Class: CLASS //ANSI C++
#ifndef __$TRUNCATE_EIGHT$CLASS$_H //Required for current class
#define __$TRUNCATE_EIGHT$CLASS$_H
#ifndef __IOSTREAM_H //Required for cin and cout
#include <iostream.h>
#endif
[ //Required for base classes
#ifndef __$TRUNCATE_EIGHT$BASE_CLASS$_H
#include "TRUNCATE_EIGHT$BASE_CLASS$.h"
#endif
]
[#include <INCLUDE_FILE> //Required for include files
]
[ //Required for 1:1 associated classes
#ifndef __$TRUNCATE_EIGHT$ASSOCIATION_ONE_CLASS$_H
#include "TRUNCATE_EIGHT$ASSOCIATION_ONE_CLASS.h"
#endif
]
[ //Required for 1:1 aggregation (part) classes
#ifndef __$TRUNCATE_EIGHT$AGGREGATION_ONE_CLASS$_H
#include "TRUNCATE_EIGHT$AGGREGATION_ONE_CLASS$.h"
#endif
]
[ //Required for 1:M associated classes
#ifndef __$TRUNCATE_EIGHT$ASSOCIATION_MANY_CLASS$_H
#include "TRUNCATE_EIGHT$ASSOCIATION_MANY_CLASS$.h"
#endif
]
[ //Required for 1:M aggregation (part) classes
#ifndef __$TRUNCATE_EIGHT$AGGREGATION_MANY_CLASS$_H
#include "TRUNCATE_EIGHT$AGGREGATION_MANY_CLASS$.h"
#endif
]
class CLASS[NO_RETURN NO_REPEAT: NO_REPEAT public BASE_CLASS ,DELETE_LAST_SYMBOL] CLASS_LIBRARY_BASE_CLASS
{ [ATTRIBUTE_TYPE ATTRIBUTE_NAME$;]
[ASSOCIATION_ONE_CLASS$* ASSOCIATION_ONE_NAME$;]
[AGGREGATION_ONE_CLASS AGGREGATION_ONE_NAME$;]
[ASSOCIATION_MANY_CLASS$* ASSOCIATION_MANY_NAME LITERAL_SYMBOL[6 LITERAL_SYMBOL];]
[AGGREGATION_MANY_CLASS AGGREGATION_MANY_NAME LITERAL_SYMBOL[6 LITERAL_SYMBOL];]
public:
//Default constructor
//Update to access base class attributes
//Update to access 1:1 part class attributes
//Update to access 1:M part class attributes
//Update to access 1:1 associated class attributes
//Update to access 1:M associated class attributes
//Ensure initial values entered
CLASS () :[NO_RETURN ATTRIBUTE_NAME(ATTRIBUTE_INITIAL_VALUE),DELETE_LAST_SYMBOL] { }
//Constructor with arguments
CLASS ([NO_RETURN ATTRIBUTE_TYPE a$ATTRIBUTE_NAME,DELETE_LAST_SYMBOL] )
: [NO_RETURN ATTRIBUTE_NAME (a$ATTRIBUTE_NAME),DELETE_LAST_SYMBOL] { }
//Copy constructor
//Update to access 1:M part class attributes
//Update to access 1:1 associated class attributes
//Update to access 1:M associated class attributes
CLASS (const CLASS$& a$CLASS ) [NO_RETURN NO_REPEAT: BASE_CLASS (a$CLASS),DELETE_LAST_SYMBOL]
{ [ ATTRIBUTE_NAME = a$CLASS$.$ATTRIBUTE_NAME;]
[AGGREGATION_ONE_NAME = a$CLASS$.$AGGREGATION_ONE_NAME;]
}
//Operator= Assignment Operator
//Update to access 1:M part class attributes
//Update to access 1:1 associated class attributes
//Update to access 1:M associated class attributes
CLASS operator= (const CLASS$& a$CLASS)
{ if (this == &a$CLASS) return *this;
[BASE_CLASS$::operator= (a$CLASS);]
[ATTRIBUTE_NAME = a$CLASS$.$ATTRIBUTE_NAME;]
[AGGREGATION_ONE_NAME = a$CLASS$.$AGGREGATION_ONE_NAME;]
return *this;
}
//Operator== Equality Operator
//Update to access 1:M part class attributes
//Update to access 1:1 associated class attributes
//Update to access 1:M associated class attributes
int operator== (const CLASS$& a$CLASS)
{ return (
[ (BASE_CLASS$::operator== (a$CLASS)) &&]
[ (AGGREGATION_ONE_NAME == a$CLASS$.$AGGREGATION_ONE_NAME) &&]
[ (ATTRIBUTE_NAME == a$CLASS$.ATTRIBUTE_NAME) &DELETE_LAST_SYMBOL&DELETE_LAST_SYMBOL]
);
}
//Operator<< for cout
friend ostream& operator<< (ostream& os, CLASS$& a$CLASS);
//Operator<< for cin
friend istream& operator>> (istream& is, CLASS$& a$CLASS);
[ //Get accessor function for attribute
ATTRIBUTE_TYPE get$ATTRIBUTE_NAME$() const
{return ATTRIBUTE_NAME$;
}
]
[ //Set accessor function for attribute
void set$ATTRIBUTE_NAME ($ATTRIBUTE_TYPE a$ATTRIBUTE_NAME$)
{ ATTRIBUTE_NAME = a$ATTRIBUTE_NAME$;
}
]
[ //Get accessor function for 1:1 aggregation
AGGREGATION_ONE_CLASS$& get$AGGREGATION_ONE_NAME$()
{return AGGREGATION_ONE_NAME$;
}
]
[ //Set accessor function for 1:1 aggregation
void set$AGGREGATION_ONE_NAME ($AGGREGATION_ONE_CLASS$& a$AGGREGATION_ONE_NAME$)
{ AGGREGATION_ONE_NAME = a$AGGREGATION_ONE_NAME$;
}
]
[ //Get accessor function for 1:1 association
ASSOCIATION_ONE_CLASS$* get$ASSOCIATION_ONE_NAME$() const
{return ASSOCIATION_ONE_NAME$;
}
]
[ //Set accessor function for 1:1 association
void set$ASSOCIATION_ONE_NAME ($ASSOCIATION_ONE_CLASS$* a$ASSOCIATION_ONE_NAME$)
{ ASSOCIATION_ONE_NAME = a$ASSOCIATION_ONE_NAME$;
}
]
[ CPP_OPERATION_VIRTUAL CPP_OPERATION_STATIC OPERATION_RETURN_TYPE OPERATION_NAME (CPP_OPERATION_PARAMETERS) CPP_OPERATION_CONSTANT CPP_OPERATION_PURE_VIRTUAL;
]
~ CLASS ( ) { } //Destructor
};
#endif